/*
 * testers.js
 *
 * Copyright (C) 2006 - OS3 srl - http://www.os3.it
 *
 * Written by: Fabio Rotondo - fabio.rotondo@os3.it
 *
 * This is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation;
 * version 2 of the License ONLY.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * NOTE: this is the GPL version of the library. If you want to include this 
 *       library inside a CLOSED SOURCE / PROPRIETARY software, you need 
 *       to purchase a COMMERCIAL LICENSE. See http://www.os3.it/license/
 *       for more info.
 */
function isEmpty ( o ) 
{
    	var i, v;

    	if ( isObject ( o ) ) 
	{
        	for ( i in o ) 
		{
        		v = o [ i ];
            		if ( isUndefined ( v ) && isFunction ( v ) ) return false;
            	}
    	}

	return true;
}

function isAlien ( a )     { return isObject ( a ) && typeof a.constructor != 'function'; }
function isArray ( a )     { return isObject ( a ) && a.constructor == Array; }
function isBoolean ( a )   { return typeof a == 'boolean'; }
function isFunction ( a )  { return typeof a == 'function'; }
function isNull ( a )      { return a === null; }
function isNumber ( a )    { return typeof a == 'number'; }
function isObject ( a )    { return ( a && typeof a == 'object' ) || isFunction ( a ); }
function isString ( a )    { return typeof a == 'string'; }
function isUndefined ( a ) { return typeof a == 'undefined'; } 
